package cn.aitrox.ry.service.dwh.controller;

import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.service.dwh.api.DwhImageApi;
import cn.aitrox.ry.service.dwh.dto.DwhImageDto;
import cn.aitrox.ry.service.dwh.dto.in.DwhImageQueryInDto;
import cn.aitrox.ry.service.dwh.service.ImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class ImageController implements DwhImageApi {

    @Autowired
    private ImageService imageService;

    @Override
    @PostMapping("/dwh/image/query")
    public RespResult<Map<String, List<DwhImageDto>>> imageQuery(@RequestBody DwhImageQueryInDto input) {
        return imageService.imageQuery(input.getSeriesUids());
    }
}
